﻿@model FairyWorld.Models.Group

@{
    ViewBag.Title = "Info";
    Layout = "~/Views/Shared/GroupLayout.cshtml";
}
<script>
    $(document).ready(function () {
        $("#infoli").attr("class", "active");
    })
</script>
<style type="text/css">
	.wrap1{ 
	width:980px; 
	background-color:#ccc; 
	position:relative; 
	transform:rotate(-1.5deg); 
	-moz-transform:rotate(-1.5deg); 
	-webkit-transform:rotate(-1.5deg);
    height:250px;
	}
	.wrap2{ 
	width:920px; 
    height:190px;
	background-color:#fff; 
	position:relative;
	transform:rotate(1.5deg); 
	-moz-transform:rotate(1.5deg);
	-webkit-transform:rotate(1.5deg); 
	box-shadow:1px 1px 4px rgba(0,0,0,0.4); 
	-moz-box-shadow:1px 1px 4px rgba(0,0,0,0.4);
	-webkit-box-shadow: 1px 1px 4px rgba(0,0,0,.4);
    padding:30px;
	}
</style>
<div style="height:30px">
</div>
<div class="wrap1">
    <div class="wrap2">      
        <fieldset>
            <legend>团队信息</legend>

            <div style="font-size:15px">
                <div class="display-field">
                    团队名称：@Html.DisplayFor(model => model.groupname)
                </div>

                <div class="display-field">
                    团队描述：@Html.DisplayFor(model => model.introduction)
                </div>
                <div class="display-field">
                    管理员：@ViewBag.Manager
                </div>
                <div class="display-field">
                    创建时间：@Html.DisplayFor(model => model.createTime)
                </div>
                <div class="display-field">
                已用空间 : 
                @{
                var fsize = 0.0;
                if (ViewBag.Size < (1 << 10))
                {
                    fsize = ViewBag.Size;
                    fsize = Math.Round(fsize, 2);
                    @(fsize.ToString()+"B")
                }
                else if(ViewBag.Size < (1 << 20))
                {
                    fsize = (ViewBag.Size / (double)(1<<10));
                    fsize = Math.Round(fsize, 2);
                    @(fsize.ToString()+"KB")
                }
                else
                {
                    fsize = (ViewBag.Size / (double)(1<<20));
                    fsize = Math.Round(fsize, 2);
                    @(fsize.ToString()+"MB")
                }
                    
                }
            </div>
            <div class="display-field">
                可用空间 :
                @{
                var fspace = 0.0;  
                if (ViewBag.Space < (1 << 10))
                {
                    fspace = ViewBag.Space;
                    fspace = Math.Round(fspace, 2);
                    @(fspace.ToString()+"B")
                }
                else if (ViewBag.Space < (1 << 20))
                {
                    fspace = (ViewBag.Space / (double)(1<<10));
                    fspace = Math.Round(fspace, 2);
                    @(fspace.ToString()+"KB")
                }
                else
                {
                    fspace = (ViewBag.Space / (double)(1<<20));
                    fspace = Math.Round(fspace, 2);
                    @(fspace.ToString()+"MB")
                }
                }
            </div>
            </div>
        </fieldset>

        @if (ViewBag.Power == 2)
        {
            @Html.ActionLink("编辑", "EditGroup", new { id=Model.GroupId })
        }
   
    </div>
</div>
